package com.ddx.service;


import com.ddx.common.exception.ResultModel;
import com.ddx.dto.BatchEditProduct;
import com.ddx.dto.ShoppingAttributeVo;
import com.ddx.dto.ShoppingCatalogVo;
import com.ddx.dto.ShoppingProductVo;
import com.ddx.pojo.ShoppingOrderDetail;
import com.ddx.pojo.ShoppingSpec;

import java.util.List;
import java.util.Map;

/**
 * @author dudianbo
 * @ClassName: ${CLASSNAME}
 * @Description: ${DESCRIPTION}
 * @date 2018/9/5
 */
public interface IShoppingProductService {

    /**
     * 商品信息
     *
     * @return
     */
    List<ShoppingProductVo> productInfo(ShoppingProductVo shoppingProductVo);

    /**
     * 商品明细
     *
     * @param productId
     * @return
     */
    ShoppingProductVo productDetail(int productId);

    /**
     * 修改库存和已售
     *
     * @param detail
     * @return
     */
    void updateStockAndYishou(ShoppingOrderDetail detail);

    /**
     * 发布商品
     *
     * @param userId
     * @param productVo
     * @return
     */
    ResultModel addProduct(int userId, ShoppingProductVo productVo) throws Exception;

    /**
     * 更新商品
     *
     * @param userId
     * @param productVo
     * @return
     */
    ResultModel editProduct(int userId, ShoppingProductVo productVo);

    Map<String, Object> getProductMap(int storeId, int index, int size, int status);

    ResultModel getProductInfo(int userId, int index, int size, int status);

    ResultModel batchEdit(BatchEditProduct batchEditProduct);

	Map<String, Object> sell(ShoppingProductVo shoppingProductVo) throws Exception;

	Map<String, Object> detailById(ShoppingProductVo shoppingProductVo) throws Exception;

    ResultModel getProductDetail(int productId);

    ResultModel deleteProduct(int productId);
}
